package com.zy.openchat.core.model.circle;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

public class BlogWrapperLocationInfo implements Parcelable {

    @SerializedName(value = "@type")
    public String type;
    public BlogLocationInfo location;
    public String address;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.type);
        dest.writeParcelable(this.location, flags);
        dest.writeString(this.address);
    }

    public void readFromParcel(Parcel source) {
        this.type = source.readString();
        this.location = source.readParcelable(BlogLocationInfo.class.getClassLoader());
        this.address = source.readString();
    }

    public BlogWrapperLocationInfo() {
    }

    protected BlogWrapperLocationInfo(Parcel in) {
        this.type = in.readString();
        this.location = in.readParcelable(BlogLocationInfo.class.getClassLoader());
        this.address = in.readString();
    }

    public static final Creator<BlogWrapperLocationInfo> CREATOR = new Creator<BlogWrapperLocationInfo>() {
        @Override
        public BlogWrapperLocationInfo createFromParcel(Parcel source) {
            return new BlogWrapperLocationInfo(source);
        }

        @Override
        public BlogWrapperLocationInfo[] newArray(int size) {
            return new BlogWrapperLocationInfo[size];
        }
    };
}
